<script setup>
import Header from "./components/Header.vue";
import Navigator from "./components/Navigator.vue";
import Content from "./components/Content.vue";
import {ref} from "vue";

let menu = ref("aaa")
let navigator_menu = ref('子传子')
let message = ref('')

function receiver(data) {
  message.value = data;
  navigator_menu.value = data;
}

</script>

<template>
  <div>
    {{ message }}<!--步骤4：渲染数据-->
    <Header></Header>
    <Navigator @sendMenu="receiver"></Navigator><!--步骤3：父组件用@子组件发射的事件名-->
    <Content :message="menu" :navigator_menu="navigator_menu"></Content>
  </div>
</template>

<style scoped>

</style>
